<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
    integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  <style>
    /*重置滚动条*/
    ::-webkit-scrollbar {
      width: 7px;
      height: 7px;
      background-color: #F5F5F5;
    }

    ::-webkit-scrollbar-thumb {
      background-color: #999;
    }

    ::-webkit-scrollbar-track {
      background-color: #F5F5F5;
    }

    * {
      margin: 0;
      padding: 0;
    }

    html,
    body {
      background-color: #f2f2f2;
    }

    ul {
      list-style: none;
      padding: 0;
    }

    /*goal-tree-header*/
    .goal-tree-header {
      height: 58px;
      padding: 0 26px;
      background-color: #fff;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .goal-tree-header .nav-bar {
      height: 32px;
    }

    .goal-tree-header .input-box {
      width: 370px;
      position: relative;
      display: inline-block;
      margin-right: 20px;
    }

    .goal-tree-header .search-box {
      position: absolute;
      width: 32px;
      height: 32px;
      top: 0;
      right: 0;
    }

    .goal-tree-header .search-box img {
      position: absolute;
      top: 50%;
      right: 5px;
      transform: translateY(-50%);
    }

    .goal-tree-header .input-box input {
      width: 100%;
      height: 32px;
      color: #707070;
      outline: none;
      border-radius: 8px;
      padding: 0 30px 0 20px;
      border: 1px solid #ccc;
    }

    /*goal-tree*/
    .goal-tree li a {
      display: block;
      color: #707070;
    }

    .goal-tree li a:link,
    .goal-tree li a:visited,
    .goal-tree li a:hover,
    .goal-tree li a:active {
      text-decoration: none;
    }

    /*goal-tree-horizontal*/
    .goal-tree-horizontal li {
      color: #707070;
    }

    .goal-tree-horizontal li .icon-box,
    .goal-tree-horizontal li .text,
    .goal-tree-horizontal li .leader {
      height: 68px;
      line-height: 68px;
      display: inline-block;
      vertical-align: middle;
    }

    .goal-tree-horizontal li .icon-box {
      width: 78px;
      position: relative;
    }

    .goal-tree-horizontal li .icon-box .icon {
      width: 24px;
      height: 24px;
      position: absolute;
      top: 50%;
      cursor: pointer;
      background-size: 100% 100%;
      background-repeat: no-repeat;
    }

    .goal-tree-horizontal li .icon-add {
      background-image: url('./imgs/+icon.png');
    }

    .goal-tree-horizontal li .icon-minus {
      background-image: url('./imgs/-icon.png');
    }

    .goal-tree-horizontal li .icon-off {
      background-image: url('./imgs/off_icon.png');
    }

    .goal-tree-horizontal li .text {
      width: calc(100% - 210px);
      box-sizing: border-box;
      padding: 0 15px;
      background-color: #fff;
    }

    .goal-tree-horizontal li .leader {
      width: 118px;
      text-align: center;
    }

    .goal-tree-horizontal li ul {
      display: none;
    }

    .goal-tree-horizontal>ul>li {
      margin-top: 6px;
      background: linear-gradient(#e9f2ff, #d9e5ff);
    }

    .goal-tree-horizontal>ul>li ul {
      padding-left: 50px;
    }

    .goal-tree-horizontal>ul>li .icon-box .icon {
      right: -15px;
      transform: translateY(-50%);
    }

    .goal-tree-horizontal>ul>li>.icon-box .icon {
      left: 50%;
      transform: translate(-50%, -50%);
    }
  </style>
</head>

<body>
  <div class="goal-tree-header">
    <img src="./imgs/logo.png" width="143" height="32" style="cursor: pointer;">
    <div class="nav-bar">
      <div class="input-box">
        <input type="text" placeholder="搜索点我...">
        <div class="search-box" style="cursor: pointer;">
          <img src="./imgs/go_icon.png" width="18" height="18">
        </div>
      </div>
      <img src="./imgs/refresh_icon.png" width="32" height="32" style="cursor: pointer;">
    </div>
    <img src="./imgs/back_icon.png" width="32" height="32" style="cursor: pointer;">
  </div>
  <div class="goal-tree goal-tree-horizontal">
    <ul>
      <li>
        <div class="icon-box"><span class="icon icon-add"></span></div>
        <div class="text"><a href="#">一级菜单1</a></div>
        <div class="leader">
          <span>张三</span>
          <span>(10)</span>
        </div>
        <ul>
          <li>
            <div class="icon-box"><span class="icon icon-minus"></span></div>
            <div class="text"><a href="#">二级菜单1</a></div>
            <div class="leader">
              <span>张三</span>
              <span>(10)</span>
            </div>
          </li>
          <ul>
            <li>
              <div class="icon-box"><span class="icon icon-off"></span></div>
              <div class="text"><a href="#">三级菜单1</a></div>
              <div class="leader">
                <span>张三</span>
                <span>(10)</span>
              </div>
            </li>
          </ul>
        </ul>
      </li>
      <li>
        <div class="icon-box"><span class="icon  icon-add"></span></div>
        <div class="text"><a href="#">一级菜单2</a></div>
        <div class="leader">
          <span>张三</span>
          <span>(10)</span>
        </div>
      </li>
    </ul>
  </div>
  <div class="goal-tree goal-tree-vertical">

  </div>

  <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  <script>
    $('.goal-tree').on('click', '.icon', function () {
      if ($(this).hasClass('icon-add')) {
        console.log('要展开')
      }
      if ($(this).hasClass('icon-minus')) {
        console.log('要收起')
      }
      if ($(this).hasClass('icon-off')) {
        console.log('要关闭')
      }
    })
  </script>
</body>

</html>